/*document.writeln("<link rel=\'stylesheet\' href=\'//g.alicdn.com/de/prismplayer/2.6.0/skins/default/aliplayer-min.css\' />");
document.writeln("<script type=\'text/javascript\' src=\'//g.alicdn.com/de/prismplayer/2.6.0/aliplayer-min.js\'></script>");*/

document.writeln("<link rel='stylesheet' href='https://g.alicdn.com/de/prismplayer/2.8.1/skins/default/aliplayer-min.css' />");
document.writeln("<script charset='utf-8' type='text/javascript' src='https://g.alicdn.com/de/prismplayer/2.8.1/aliplayer-min.js'></script>");

function  VideoPlayFun(){ 
	AddVideoDivObj();
	var VideoLy = arguments[0];
	var VideoFm = arguments[1] ? arguments[1] : '0';
	var videoW = arguments[2] ? arguments[2] : '980px';
	var videoH = arguments[3] ? arguments[3] : '539px';videoW=String(videoW); videoH=String(videoH);
	if((videoW.indexOf('px')==-1)&&(videoW.indexOf('%')==-1))
	videoW=videoW+'px';		
	if((videoH.indexOf('px')==-1)&&(videoH.indexOf('%')==-1))
	videoH=videoH+'px';		
	VideoFm='http://img.ef43.com.cn/video/fm/'+VideoFm+'.jpg';		
	var player = new Aliplayer({
		id: 'J_prismPlayer',
		autoplay: false,
		isLive:false,
		playsinline:true,
		width:videoW,
		height:videoH,
		controlBarVisibility:'always',
		useH5Prism:true,
		useFlashPrism:false,
		x5_type:'h5',
		source:VideoLy,
		cover:VideoFm
	},function(player){
	   console.log('播放器创建了。');
	}
	);
}

function AddVideoDivObj()
{
		var spanNew = document.createElement("div");// 创建span   
		spanNew.id ="J_prismPlayer";// 生成spanid   
		spanNew.className = "prism-player";  
		document.getElementById('aliVideo').appendChild(spanNew);		
}